<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

    <table border="1" width="500px">

       <tr>
           <th>编号</th>
           <th>部门名称</th>
           <th>查看</th>
       </tr>

        <tr th:each="dept : ${list}">
            <td th:text="${dept.id}"></td>
            <td th:text="${dept.name}"></td>
            <td><a th:href="@{/showEmp(did=${dept.id})}">查看</a></td>
        </tr>
    </table>
</body>
</html>